package org.zch.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zch.dao.PublicActivityDAO;
import org.zch.entity.po.PublicActivityPO;
import org.zch.service.PublicActivityService;

import java.util.List;

/**
 * 广场
 */
@Service
public class PublicActivityServiceImpl implements PublicActivityService {

    @Autowired
    private PublicActivityDAO publicActivityDAO;


    @Override
    public List<PublicActivityPO> findAll() {
        return publicActivityDAO.selectList(null);
    }

    @Override
    public Integer addActivity(PublicActivityPO publicActivityPO) {
        return publicActivityDAO.insert(publicActivityPO);
    }

    @Override
    public Integer delActivity(Integer id) {
        return publicActivityDAO.deleteById(id);
    }
}
